﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class SoundInfos : MonoBehaviour
{
	// Members

	static Dictionary<string, SfxData>	s_sfxDict	= new Dictionary<string, SfxData>();
	static Dictionary<string, BgmData>	s_bgmDict	= new Dictionary<string, BgmData>();


	public static SfxData GetSfx(string name)
	{
		return s_sfxDict[name];
	}

	public static BgmData GetBgm(string name)
	{
		return s_bgmDict[name];
	}


	static SoundInfos()
	{
		// 사운드/브금 정의

		SfxData temp;

		temp					= new SfxData();
		temp.clipPath			= "shoot";
		temp.type				= SfxData.Type.AtPosition;
		temp.looping			= false;
		temp.pitchRandomRange	= 0.1f;
		s_sfxDict["shoot"]		= temp;

		temp					= new SfxData();
		temp.clipPath			= "hit";
		temp.type				= SfxData.Type.AtPosition;
		temp.looping			= false;
		temp.pitchRandomRange	= 0.1f;
		s_sfxDict["hit"]		= temp;

		temp					= new SfxData();
		temp.clipPath			= "jump";
		temp.type				= SfxData.Type.AtPosition;
		temp.looping			= false;
		temp.pitchRandomRange	= 0.1f;
		s_sfxDict["jump"]		= temp;

		temp					= new SfxData();
		temp.clipPath			= "death";
		temp.type				= SfxData.Type.AtPosition;
		temp.looping			= false;
		temp.pitchRandomRange	= 0.1f;
		s_sfxDict["death"]		= temp;

		temp					= new SfxData();
		temp.clipPath			= "bloodspit";
		temp.type				= SfxData.Type.AtPosition;
		temp.looping			= false;
		temp.pitchRandomRange	= 0.1f;
		s_sfxDict["bloodspit"]	= temp;

		temp					= new SfxData();
		temp.clipPath			= "death_long";
		temp.type				= SfxData.Type.Static;
		temp.looping			= false;
		temp.pitchRandomRange	= 0f;
		s_sfxDict["clockhand_death"]= temp;

		temp					= new SfxData();
		temp.clipPath			= "pointgain";
		temp.type				= SfxData.Type.AtPosition;
		temp.looping			= false;
		temp.pitchRandomRange	= 0.0f;
		s_sfxDict["pointgain"]		= temp;



		BgmData bgmTemp;

		bgmTemp					= new BgmData();
		bgmTemp.clipPath		= "bgm01";
		bgmTemp.looping			= true;
		s_bgmDict["field"]		= bgmTemp;

		bgmTemp					= new BgmData();
		bgmTemp.clipPath		= "bgm02";
		bgmTemp.looping			= true;
		s_bgmDict["clockhand"]	= bgmTemp;

		bgmTemp					= new BgmData();
		bgmTemp.clipPath		= "bgm03";
		bgmTemp.looping			= true;
		s_bgmDict["epilogue"]	= bgmTemp;

		bgmTemp					= new BgmData();
		bgmTemp.clipPath		= "bgm03-1";
		bgmTemp.looping			= false;
		s_bgmDict["ending"]		= bgmTemp;
	}
}
